   <script type="text/javascript" language="javascript">
   {literal}
   $(document).ready(function(){
    $.validator.addMethod("emailcheck", function (value, element) {
    return this.optional(element) || /^[a-zA-Z0-9]+[a-zA-Z0-9_-]+@[a-zA-Z0-9]+[a-zA-Z0-9.-]+[a-zA-Z0-9]+.[a-z]{2,4}$/.test(value);
	}, "Vložte platnú email adresu.");
   
   $("#reg").validate({
       rules: {
           name: {
               required: true,
               minlength: 2
           },
           surname: {
               required: true,
               minlength: 2
           },
           email: {
               required: true,
               emailcheck: true
           },
           password: {
               required: true,
               minlength: 5
           },
           password2: {
               equalTo: "#password"
           }
      },
      messages: {
        name:{ 
      	    required: " Musíte vložiť meno.",
      		minlength: " Meno musí mať aspoň 2 znaky."
      	},
      	surname:{ 
      	    required: " Musíte vložiť priezvisko.",
      		minlength: " Priezvisko musí mať aspoň 2 znaky."
      	},
      	email:{ 
      		required: " Musíte zadať Vašu e-mail adresu.",
      	 	emailcheck: " Vložte platnú e-mail adresu."
      	},
      	password:{ 
      	    required: " Musíte vložiť heslo.",
      		minlength: " Heslo musí mať aspoň 5 znakov."
      	},
      	password2:{ 
      		equalTo: " Heslo sa nezhoduje."
      	}
      }
   });
   })
   {/literal}
   </script>
   	
	<div class="ui-widget-content">
		<h1 align="center" class="ui-state-active" style="padding: 10px;">Registrácia</h1>
		<form id="reg" class="ui-widget-content" action="register?action=register" method="post" style="padding: 20px; margin: auto; margin-bottom: 20px; width: 350px;">
			<h2 class="ui-state-active" style="padding: 10px;">Vyplňte nasledujúce údaje</h2>
			
			Meno: <br />
			<input type="text" name="name" /> <br />
			Priezvisko: <br />
			<input type="text" name="surname" /> <br />
			E-mail: <br />
			<input type="text" name="email" value="@" /> <br />
			Heslo: <br />
			<input id="password" type="password" name="password" /> <br />
			Znova zadajte heslo: <br />
			<input type="password" name="password2" /> <br /><br />
			<input type="submit" value="registruj" class="button"/>
		</form>
		
	</div>
